#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Get application name
application="icoIbFoam"

compileApplication refineCylinderMesh

\rm -rf 0
mkdir 0

\cp -f blockMeshDict constant/polyMesh/blockMeshDict
runApplication blockMesh
\cp -f boundary constant/polyMesh/boundary

runApplication refineCylinderMesh

runApplication refineImmersedBoundaryMesh
rm log.refineImmersedBoundaryMesh

runApplication refineImmersedBoundaryMesh

\rm -rf constant/polyMesh
\mv 0/polyMesh constant/polyMesh


\rm -rf 0
\cp -r save 0

#runApplication potentialIbFoam
runApplication $application
